\section{sdo\+\_\+request.\+h File Reference}
\label{sdo__request_8h}\index{sdo\+\_\+request.\+h@{sdo\+\_\+request.\+h}}


Ether\+C\+AT C\+A\+Nopen S\+DO request structure.  


\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ ec\+\_\+sdo\+\_\+request}
\begin{DoxyCompactList}\small\item\em C\+A\+Nopen S\+DO request. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\label{sdo__request_8h_ad8aff35de00f93957ff85baafa8fd4e7}} 
void \textbf{ ec\+\_\+sdo\+\_\+request\+\_\+init} (\textbf{ ec\+\_\+sdo\+\_\+request\+\_\+t} $\ast$)
\begin{DoxyCompactList}\small\item\em S\+DO request constructor. \end{DoxyCompactList}\item 
\mbox{\label{sdo__request_8h_a74443922a8e3286319551f013ca4a497}} 
void \textbf{ ec\+\_\+sdo\+\_\+request\+\_\+clear} (\textbf{ ec\+\_\+sdo\+\_\+request\+\_\+t} $\ast$)
\begin{DoxyCompactList}\small\item\em S\+DO request destructor. \end{DoxyCompactList}\item 
int \textbf{ ec\+\_\+sdo\+\_\+request\+\_\+copy} (\textbf{ ec\+\_\+sdo\+\_\+request\+\_\+t} $\ast$, const \textbf{ ec\+\_\+sdo\+\_\+request\+\_\+t} $\ast$)
\begin{DoxyCompactList}\small\item\em Copy another S\+DO request. \end{DoxyCompactList}\item 
int \textbf{ ec\+\_\+sdo\+\_\+request\+\_\+alloc} (\textbf{ ec\+\_\+sdo\+\_\+request\+\_\+t} $\ast$, size\+\_\+t)
\begin{DoxyCompactList}\small\item\em Pre-\/allocates the data memory. \end{DoxyCompactList}\item 
int \textbf{ ec\+\_\+sdo\+\_\+request\+\_\+copy\+\_\+data} (\textbf{ ec\+\_\+sdo\+\_\+request\+\_\+t} $\ast$, const uint8\+\_\+t $\ast$, size\+\_\+t)
\begin{DoxyCompactList}\small\item\em Copies S\+DO data from an external source. \end{DoxyCompactList}\item 
int \textbf{ ec\+\_\+sdo\+\_\+request\+\_\+timed\+\_\+out} (const \textbf{ ec\+\_\+sdo\+\_\+request\+\_\+t} $\ast$)
\begin{DoxyCompactList}\small\item\em Checks, if the timeout was exceeded. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Ether\+C\+AT C\+A\+Nopen S\+DO request structure. 



\subsection{Function Documentation}
\mbox{\label{sdo__request_8h_a45646d530be29f32d4519c8dbba47426}} 
\index{sdo\+\_\+request.\+h@{sdo\+\_\+request.\+h}!ec\+\_\+sdo\+\_\+request\+\_\+copy@{ec\+\_\+sdo\+\_\+request\+\_\+copy}}
\index{ec\+\_\+sdo\+\_\+request\+\_\+copy@{ec\+\_\+sdo\+\_\+request\+\_\+copy}!sdo\+\_\+request.\+h@{sdo\+\_\+request.\+h}}
\subsubsection{ec\+\_\+sdo\+\_\+request\+\_\+copy()}
{\footnotesize\ttfamily int ec\+\_\+sdo\+\_\+request\+\_\+copy (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+sdo\+\_\+request\+\_\+t} $\ast$}]{req,  }\item[{const \textbf{ ec\+\_\+sdo\+\_\+request\+\_\+t} $\ast$}]{other }\end{DoxyParamCaption})}



Copy another S\+DO request. 

\begin{DoxyAttention}{Attention}
Only the index subindex and data are copied.
\end{DoxyAttention}
\begin{DoxyReturn}{Returns}
Zero on success, otherwise a negative error code. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em req} & S\+DO request. \\
\hline
{\em other} & Other S\+DO request to copy from. \\
\hline
\end{DoxyParams}


Definition at line 91 of file sdo\+\_\+request.\+c.

\mbox{\label{sdo__request_8h_a231aeb547727a89b100f02284637f8d6}} 
\index{sdo\+\_\+request.\+h@{sdo\+\_\+request.\+h}!ec\+\_\+sdo\+\_\+request\+\_\+alloc@{ec\+\_\+sdo\+\_\+request\+\_\+alloc}}
\index{ec\+\_\+sdo\+\_\+request\+\_\+alloc@{ec\+\_\+sdo\+\_\+request\+\_\+alloc}!sdo\+\_\+request.\+h@{sdo\+\_\+request.\+h}}
\subsubsection{ec\+\_\+sdo\+\_\+request\+\_\+alloc()}
{\footnotesize\ttfamily int ec\+\_\+sdo\+\_\+request\+\_\+alloc (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+sdo\+\_\+request\+\_\+t} $\ast$}]{req,  }\item[{size\+\_\+t}]{size }\end{DoxyParamCaption})}



Pre-\/allocates the data memory. 

If the {\itshape mem\+\_\+size} is already bigger than {\itshape size}, nothing is done.

\begin{DoxyReturn}{Returns}
0 on success, otherwise -\/\+E\+N\+O\+M\+EM. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em req} & S\+DO request. \\
\hline
{\em size} & Data size to allocate. \\
\hline
\end{DoxyParams}


Definition at line 127 of file sdo\+\_\+request.\+c.

\mbox{\label{sdo__request_8h_a0aaf97fcc7f73f88d76a44e8d12499c2}} 
\index{sdo\+\_\+request.\+h@{sdo\+\_\+request.\+h}!ec\+\_\+sdo\+\_\+request\+\_\+copy\+\_\+data@{ec\+\_\+sdo\+\_\+request\+\_\+copy\+\_\+data}}
\index{ec\+\_\+sdo\+\_\+request\+\_\+copy\+\_\+data@{ec\+\_\+sdo\+\_\+request\+\_\+copy\+\_\+data}!sdo\+\_\+request.\+h@{sdo\+\_\+request.\+h}}
\subsubsection{ec\+\_\+sdo\+\_\+request\+\_\+copy\+\_\+data()}
{\footnotesize\ttfamily int ec\+\_\+sdo\+\_\+request\+\_\+copy\+\_\+data (\begin{DoxyParamCaption}\item[{\textbf{ ec\+\_\+sdo\+\_\+request\+\_\+t} $\ast$}]{req,  }\item[{const uint8\+\_\+t $\ast$}]{source,  }\item[{size\+\_\+t}]{size }\end{DoxyParamCaption})}



Copies S\+DO data from an external source. 

If the {\itshape mem\+\_\+size} is to small, new memory is allocated.


\begin{DoxyRetVals}{Return values}
{\em 0} & Success. \\
\hline
{\em $<$0} & Error code. \\
\hline
\end{DoxyRetVals}

\begin{DoxyParams}{Parameters}
{\em req} & S\+DO request. \\
\hline
{\em source} & Source data. \\
\hline
{\em size} & Number of bytes in {\itshape source}. \\
\hline
\end{DoxyParams}


Definition at line 156 of file sdo\+\_\+request.\+c.

\mbox{\label{sdo__request_8h_aeb06bad8f9b2fb2379b274c2bb3d7b69}} 
\index{sdo\+\_\+request.\+h@{sdo\+\_\+request.\+h}!ec\+\_\+sdo\+\_\+request\+\_\+timed\+\_\+out@{ec\+\_\+sdo\+\_\+request\+\_\+timed\+\_\+out}}
\index{ec\+\_\+sdo\+\_\+request\+\_\+timed\+\_\+out@{ec\+\_\+sdo\+\_\+request\+\_\+timed\+\_\+out}!sdo\+\_\+request.\+h@{sdo\+\_\+request.\+h}}
\subsubsection{ec\+\_\+sdo\+\_\+request\+\_\+timed\+\_\+out()}
{\footnotesize\ttfamily int ec\+\_\+sdo\+\_\+request\+\_\+timed\+\_\+out (\begin{DoxyParamCaption}\item[{const \textbf{ ec\+\_\+sdo\+\_\+request\+\_\+t} $\ast$}]{req }\end{DoxyParamCaption})}



Checks, if the timeout was exceeded. 

\begin{DoxyReturn}{Returns}
non-\/zero if the timeout was exceeded, else zero. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em req} & S\+DO request. \\
\hline
\end{DoxyParams}


Definition at line 177 of file sdo\+\_\+request.\+c.

